-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(bank-transfer): remove billing from banktransfer payment data #4377
Conversation
@@ -1252,12 +1252,13 @@ fn get_bank_debit_data( | |||
} | |||
} | |||
|
|||
fn create_stripe_payment_method( | |||
fn create_stripe_payment_method<F, Req, Res>( | |||
payment_method_data: &domain::PaymentMethodData, | |||
auth_type: enums::AuthenticationType, | |||
payment_method_token: Option<types::PaymentMethodToken>, | |||
is_customer_initiated_mandate_payment: Option<bool>, | |||
billing_address: StripeBillingAddress, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you already have the billing address here right, do we need to use routerdata again here?
let billing_details = StripeBillingAddress { | ||
email: Some(billing_details.email.clone()), | ||
name: Some(billing_details.name.clone()), | ||
email: item.get_optional_billing_email(), | ||
name: item.get_optional_billing_full_name(), | ||
..Default::default() | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This billing address need not be constructed, since we already have the billing address
email: item.get_optional_billing_email(), | ||
name: item.get_optional_billing_full_name(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case too, this need not be constructed
Type of Change
Description
This PR includes changes to use
payment_method_data.billing.first_name
,payment_method_data.last_name
andpayment_method_data.email
instead ofpayment_method_data.[BankTransfers->BillingDetails]
at the connector level. The backwards compatibility is provided.Additional Changes
Motivation and Context
How did you test it?
Response
Response:
Checklist
cargo +nightly fmt --all
cargo clippy